From 4f32cad22c9faaf10470b22eb117b0c06d57f909 Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Mon, 10 Apr 2006 17:25:42 +0100 Subject: [PATCH] Fix push/pop usage in tools/ioemu for x86/64. Signed-off-by: Keir Fraser --- tools/ioemu/hw/vga.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/ioemu/hw/vga.c b/tools/ioemu/hw/vga.c index 11daaa27a2..c6fca32ae4 100644 --- a/tools/ioemu/hw/vga.c +++ b/tools/ioemu/hw/vga.c @@ -1369,10 +1369,16 @@ static inline unsigned int cpuid_edx(unsigned int op) { unsigned int eax, edx; - __asm__("pushl %%ebx; cpuid; popl %%ebx" +#ifdef __x86_64__ +#define __bx "rbx" +#else +#define __bx "ebx" +#endif + __asm__("push %%"__bx"; cpuid; pop %%"__bx : "=a" (eax), "=d" (edx) : "0" (op) : "cx"); +#undef __ebx return edx; } -- 2.30.2